import { AxiosResponse } from 'axios'
import Service from '../../request'

interface CreateTabInfo {
  name: string
  url: string
}

export function addTab(tab: CreateTabInfo, collectionId: string) {
  return Service.post<
    CreateTabInfo,
    AxiosResponse<Response<{ message: string }>>
  >(`/tab/${collectionId}`, tab)
}
